const { config } = require('./common')

const { apiPrefix } = config
let database = [
  {
    id: '',
    //JESSE REMARK: 菜单信息可以由后台直接返回，无用的代码在合并到主分支时需要删除，保持代码简洁。
    // icon: 'dashboard',
    // name: '主页',
    route: '/dashboard',
  },
  {
    id: '2',
    // bpid: '2',
    name: '菜谱管理',
    icon: 'setting',
    route: '/RecipeManage',
  },
  {
    id: '21',
    bpid: '2',
    mpid: '2',
    name: '新增菜谱',
    route: '/RecipeManage/addRecipe',
  },
  {
    id: '22',
    bpid: '2',
    mpid: '2',
    name: '菜谱查询',
    route: '/RecipeManage/queryRecipe',
  },
  {
    id: '',
    bpid: '',
    mpid: '',
    name: '',
    route: '/RecipeManage/detailRecipe',
  },
  {
    id: '3',
    name: '人员管理',
    icon:'user',
    route: '/peopleManage'
  },
  {
    id: '31',
    bpid:'3',
    mpid:'3',
    name: '人员查询',
    route: '/peopleManage/peoplequery'
  },
  {
    id: '32',
    bpid: '3',
    mpid: '3',
    name: '添加成员',
    route: '/peopleManage/addpeople' 
  },
  {
    id: '4',
    // bpid: '2',
    name: '系统管理',
    icon: 'api',
    route: '/bav',
  },
  {
    id: '41',
    bpid: '4',
    mpid:'4',
    name: '日志查询',
    route: '/bav/log',
  },{
    id:'42',
    bpid: '4',
    mpid: '4',
    name: '程序管理',
    route: '/bav/programManage',
  },{
    id: '43',
    bpid:'4',
    mpid: '4',
    name: '分类管理',
    route: '/bav/classify'
  },
  {
    id: '44',
    bpid: '4',
    mpid: '4',
    name: '食材管理',
    route: '/bav/material'
  }
  // {
  //   id: '9',
  //   // bpid: '2',
  //   name: '菜谱管理',
  //   icon: 'setting',
  //   route: '/RecipeManage',
  // },
  // {
  //   id: '91',
  //   bpid: '9',
  //   mpid: '9',
  //   name: '新增菜谱',
  //   route: '/RecipeManage/addRecipe',
  // },
  // {
  //   id: '92',
  //   bpid: '9',
  //   mpid: '9',
  //   name: '菜谱查询',
  //   route: '/RecipeManage/queryRecipe',
  // },
  // {
  //   id: '',
  //   bpid: '',
  //   mpid: '',
  //   name: '',
  //   route: '/RecipeManage/detailRecipe',
  // }
]

module.exports = {

  [`GET ${apiPrefix}/menus`] (req, res) {
    res.status(200).json(database)
  },
}
